package cn.bisoft.java.bean.entity;

import java.io.Serializable;



/**
 * This is an object that contains data related to the AnteCounterType table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="AnteCounterType"
 */

public abstract class BaseAnteCounterType  implements Serializable {
	private static final long serialVersionUID = 1L;
	public static String REF = "AnteCounterType";
	public static String PROP_COUNTER_TYPE_I_D = "counterTypeID";
	public static String PROP_COUNTER_TYPE_NAME = "counterTypeName";


	// constructors
	public BaseAnteCounterType () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseAnteCounterType (java.lang.Integer counterTypeID) {
		this.setCounterTypeID(counterTypeID);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseAnteCounterType (
		java.lang.Integer counterTypeID,
		java.lang.String counterTypeName) {

		this.setCounterTypeID(counterTypeID);
		this.setCounterTypeName(counterTypeName);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer counterTypeID;

	// fields
	private java.lang.String counterTypeName;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="assigned"
     *  column="CounterTypeID"
     */
	public java.lang.Integer getCounterTypeID () {
		return counterTypeID;
	}

	/**
	 * Set the unique identifier of this class
	 * @param counterTypeID the new ID
	 */
	public void setCounterTypeID (java.lang.Integer counterTypeID) {
		this.counterTypeID = counterTypeID;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: CounterTypeName
	 */
	public java.lang.String getCounterTypeName () {
		return counterTypeName;
	}

	/**
	 * Set the value related to the column: CounterTypeName
	 * @param counterTypeName the CounterTypeName value
	 */
	public void setCounterTypeName (java.lang.String counterTypeName) {
		this.counterTypeName = counterTypeName;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof AnteCounterType)) return false;
		else {
			AnteCounterType anteCounterType = (AnteCounterType) obj;
			if (null == this.getCounterTypeID() || null == anteCounterType.getCounterTypeID()) return false;
			else return (this.getCounterTypeID().equals(anteCounterType.getCounterTypeID()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getCounterTypeID()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getCounterTypeID().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}